package dataStruct.graph;

/**
 * Created by thinkpad on 2016/3/20.
 */
public class AsKey {
    public AsKey(String srcNode, String dstNode) {
        this.srcNode = srcNode;
        this.dstNode = dstNode;
    }

    public String getSrcNode() {
        return srcNode;
    }

    public void setSrcNode(String srcNode) {
        this.srcNode = srcNode;
    }

    public String getDstNode() {
        return dstNode;
    }

    public void setDstNode(String dstNode) {
        this.dstNode = dstNode;
    }

    String srcNode;
    String dstNode;

    @Override
    public int hashCode() {
        return 1;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        AsKey asKey = (AsKey) o;

        if(srcNode!=null&&dstNode!=null&&asKey.getSrcNode()!=null&&asKey.getDstNode()!=null) {
            if(srcNode.equals(asKey.getSrcNode())&&dstNode.equals(asKey.getDstNode())) {
                return true;
            } else {
                return false;
            }
        } else {
            //to do
        }
        return true;
    }
}
